package com.example.backend.annotation.constraint;

import com.example.backend.annotation.validation.Decimal102Validator;

import javax.validation.Constraint;
import javax.validation.Payload;
import java.lang.annotation.*;

@Target({ElementType.FIELD, ElementType.PARAMETER})
@Retention(RetentionPolicy.RUNTIME)
@Constraint(validatedBy = Decimal102Validator.class)
@Documented
public @interface ValideDecimal102 {
    String message() default "费用格式不正确，需符合DECIMAL(10,2)规范";

    Class<?>[] groups() default {};

    Class<? extends Payload>[] payload() default {};

    boolean nullable() default false; // 是否允许为空
}
